package code.junitDemo;

import java.sql.Connection;
import java.sql.DriverManager;

public class otherExample {
	
	public String getName() {
		return "xerxeslee";
	}
	
	public Connection getCon() {
		Connection con = null;
		String url = "jdbc:mysql://localhost:3306/login?serverTimezone=GMT";
		String dbName = "root";
		String dbPass = "123456";
		try {
			Class.forName("com.mysql.cj.jdbc.Driver");
			con = DriverManager.getConnection(url, dbName, dbPass);
		} catch (Exception sqlEx) {
			sqlEx.printStackTrace();
		}
		return con;
	}
}
